<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWmsWarehouse extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        \DB::statement('DROP TABLE IF EXISTS `wms_warehouse`;');
        \DB::statement('CREATE TABLE `wms_warehouse` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(99) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT \'仓库名称\',
  `type` tinyint(3) unsigned NOT NULL DEFAULT \'0\' COMMENT \'仓库类型\',
  `country` text COLLATE utf8mb4_unicode_ci COMMENT \'国家\',
  `province` text COLLATE utf8mb4_unicode_ci COMMENT \'省/州\',
  `city` text COLLATE utf8mb4_unicode_ci COMMENT \'城市\',
  `addr` text COLLATE utf8mb4_unicode_ci COMMENT \'具体地址\',
  `postcode` text COLLATE utf8mb4_unicode_ci COMMENT \'邮编\',
  `tel` text COLLATE utf8mb4_unicode_ci COMMENT \'电话\',
  `manager` text COLLATE utf8mb4_unicode_ci COMMENT \'联系人\',
  `phone` text COLLATE utf8mb4_unicode_ci COMMENT \'联系人手机\',
  `is_on` tinyint(1) NOT NULL DEFAULT \'0\' COMMENT \'是否启用\',
  PRIMARY KEY (`id`),
  KEY `type` (`type`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wms_warehouse');
    }
}
